<template>
  <div>
    4 接收外部的数据为{{ content }}
    <hr />
    接收的外部数据为{{ msg }}
  </div>
</template>

<script>
import { info } from "@/bus/event";
import { bus } from "@/bus";
export default {
  data() {
    return {
      content: "",
      msg: "", //消息
    };
  },
  created() {
    info.$on("sendValue", (content) => {
      this.content = content;
    });
    bus.$on("sendMsg", (msg) => {
      this.msg = msg;
    });
  },
};
</script>

<style></style>
